/* =========================================================
   Speed Hero — cursor spotlight
   File: wwwroot/css/speed-hero.css
   Used by: Views/Partials/blocklist/Components/speedHeroBlock.cshtml
   A navy veil covers the image; a soft light spot follows the
   cursor and reveals the image underneath.
   All classes start with "oc-" to avoid clashes.
   Hover: the spot glides after the cursor and opens wider,
   the image brightens, the button fills white.
   ========================================================= */
 
.oc-spot {
  box-sizing: border-box;
  --oc-navy: 22, 37, 102;           /* the veil colour as R, G, B (#162566) */
  --oc-orange: #ff9a45;
  --oc-gutter: 6.8vw;
  --oc-header: 80px;                /* height of your site header */
 
  /* spotlight position + size (JS updates x/y) */
  --x: 68%;
  --y: 48%;
  --r: clamp(260px, 30vw, 760px);
  transition: --r 1.1s cubic-bezier(.22, .61, .36, 1);
 
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: clamp(460px, 42vw, 1080px);
  overflow: hidden;
  background: rgb(var(--oc-navy));
  color: #fff;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.oc-spot *, .oc-spot *::before, .oc-spot *::after { box-sizing: border-box; margin: 0; padding: 0; }
.oc-spot.is-hover { --r: clamp(300px, 34vw, 860px); }
 
/* lets the spot size animate smoothly (browsers without @property just snap) */
@property --r { syntax: "<length>"; inherits: true; initial-value: 500px; }
 
/* ---------- IMAGE + SPOTLIGHT ---------- */
.oc-spot__img {
  position: absolute;
  inset: -2%;                         /* a little bleed for the parallax drift */
  z-index: -2;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: 70% center;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.02);
  will-change: transform;
  filter: saturate(.9) brightness(.95);
  transition: filter 1.2s ease;
}
.oc-spot.is-hover .oc-spot__img { filter: saturate(1.05) brightness(1.02); }
.oc-spot__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* the light spot */
    radial-gradient(
      circle var(--r) at var(--x) var(--y),
      rgba(var(--oc-navy), 0)    0%,
      rgba(var(--oc-navy), 0)   35%,
      rgba(var(--oc-navy), .3)  65%,
      rgba(var(--oc-navy), .72) 100%
    );
}
/* keeps the text side dark and readable; lightens while the cursor is in the hero */
.oc-spot__veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(var(--oc-navy), .45) 0%, rgba(var(--oc-navy), 0) 40%);
  transition: opacity 1.1s ease;
}
.oc-spot.is-hover .oc-spot__veil::after { opacity: .35; }
 
/* speed lines (canvas added by speed-hero.js): transparent streaks over the image,
   strongest inside the spotlight and fading out towards the edges */
.oc-spot__lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .7;
  -webkit-mask-image: radial-gradient(circle calc(var(--r) * 1.25) at var(--x) var(--y), #000 0%, rgba(0, 0, 0, .75) 55%, rgba(0, 0, 0, .3) 100%);
  mask-image: radial-gradient(circle calc(var(--r) * 1.25) at var(--x) var(--y), #000 0%, rgba(0, 0, 0, .75) 55%, rgba(0, 0, 0, .3) 100%);
  transition: opacity 1.2s ease;
}
.oc-spot.is-hover .oc-spot__lines { opacity: 1; }
 
/* soft light that follows the cursor over EVERYTHING: text side, image and the feature strip.
   It sits on top (pointer-events: none) and uses "screen", so it only adds light. */
.oc-spot__glow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle calc(var(--r) * .55) at var(--x) var(--y),
      rgba(150, 175, 255, .3) 0%, rgba(120, 150, 255, .14) 45%, rgba(120, 150, 255, 0) 100%);
  mix-blend-mode: screen;
  opacity: .35;
  transition: opacity 1.1s ease;
}
.oc-spot.is-hover .oc-spot__glow { opacity: 1; }
 
/* ---------- CONTENT ---------- */
.oc-spot__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: calc(var(--oc-header) * 0 + clamp(20px, 1.9vw, 50px)) var(--oc-gutter) clamp(40px, 4.5vw, 116px);
}
.oc-spot__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  font-size: clamp(10px, 0.62vw, 16px);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.oc-spot__crumbs a { color: inherit; text-decoration: none; }
.oc-spot__crumbs a:hover { text-decoration: underline; }
.oc-spot__crumbs li + li::before { content: "›"; margin-right: 6px; }
 
.oc-spot__body {
  max-width: clamp(320px, 43vw, 1100px);
  margin-top: clamp(32px, 4.3vw, 110px);
}
.oc-spot__eyebrow {
  font-size: clamp(11px, 0.82vw, 21px);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: clamp(14px, 1.7vw, 44px);
}
.oc-spot h1 {
  font-weight: 600;
  font-size: clamp(28px, 3.3vw, 84px);
  line-height: 1.24;
  letter-spacing: normal;
  text-transform: none;
  color: #fff;
}
.oc-spot__lead {
  margin-top: clamp(14px, 1.6vw, 40px);
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(13px, 0.86vw, 22px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .92);
}
 
/* button with white dot that grows on hover */
.oc-spot__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(20px, 2.1vw, 54px);
  padding: 0.55em 0.55em 0.55em 1em;
  background: var(--oc-orange);
  color: #fff;
  font-size: clamp(12px, 0.84vw, 22px);
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}
.oc-spot__btn-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: #fff;
}
.oc-spot__btn-dot::before {          /* white fill that expands across the button */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: #fff;
  transform: scale(1);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.oc-spot__btn-dot svg {
  width: 55%;
  height: 55%;
  fill: none;
  stroke: var(--oc-orange);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
  transform: none;
  transition: opacity .25s ease, transform .45s cubic-bezier(.2, .7, .2, 1);
}
.oc-spot__btn span:first-child { position: relative; z-index: 1; transition: color .35s ease .05s; }
.oc-spot__btn:hover .oc-spot__btn-dot::before,
.oc-spot__btn:focus-visible .oc-spot__btn-dot::before { transform: scale(22); }
.oc-spot__btn:hover span:first-child,
.oc-spot__btn:focus-visible span:first-child { color: var(--oc-orange); }
.oc-spot__btn:hover .oc-spot__btn-dot svg,
.oc-spot__btn:focus-visible .oc-spot__btn-dot svg { opacity: 1; transform: translate(2px, -2px); }
.oc-spot__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
 
.oc-spot__link {
  display: table;
  margin-top: clamp(14px, 1.5vw, 38px);
  font-size: clamp(12px, 0.84vw, 22px);
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.oc-spot__link { transition: color .3s ease, text-underline-offset .3s ease; }
.oc-spot__link:hover { color: var(--oc-orange); text-underline-offset: 6px; }
 
/* ---------- FEATURE STRIP (bottom) ---------- */
.oc-spot__features {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px clamp(16px, 2vw, 52px);
  margin: 0;
  padding: clamp(16px, 1.75vw, 46px) var(--oc-gutter);
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, .18);
  background: rgba(var(--oc-navy), .38);
  transition: background-color 1.1s ease, border-color 1.1s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.oc-spot.is-hover .oc-spot__features { background-color: rgba(var(--oc-navy), .22); border-color: rgba(255, 255, 255, .26); }
.oc-spot__feature {
  display: flex;
  align-items: center;
  gap: clamp(10px, 0.95vw, 24px);
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(11px, 0.85vw, 22px);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  color: #fff;
}
.oc-spot__feature svg {
  flex-shrink: 0;
  width: clamp(20px, 1.5vw, 38px);
  height: clamp(20px, 1.5vw, 38px);
  fill: none;
  stroke: var(--oc-orange);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s ease;
}
.oc-spot__feature-icon {               /* uploaded icon (SVG or PNG) */
  flex-shrink: 0;
  width: clamp(20px, 1.5vw, 38px);
  height: clamp(20px, 1.5vw, 38px);
  object-fit: contain;
  transition: transform .3s ease;
}
.oc-spot__feature span { transition: color .3s ease; }
.oc-spot__feature:hover span { color: var(--oc-orange); }
.oc-spot__feature:hover svg,
.oc-spot__feature:hover .oc-spot__feature-icon { transform: scale(1.12); }
 
@media (max-width: 900px) {
  .oc-spot__features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oc-spot__feature { white-space: normal; font-size: 13px; }
}
@media (max-width: 480px) {
  .oc-spot__features { grid-template-columns: 1fr; }
}
 
/* ---------- ENTRANCE (text fades up once the page loads) ---------- */
.oc-spot.js-anim .oc-spot__in { opacity: 0; transform: translateY(18px); }
.oc-spot.js-anim.is-ready .oc-spot__in {
  opacity: 1;
  transform: none;
  transition: opacity .9s ease var(--d, 0s), transform 1.1s cubic-bezier(.16, 1, .3, 1) var(--d, 0s);
}
 
/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .oc-spot { --oc-gutter: 24px; --r: 70vw; min-height: 0; }
  .oc-spot__img { object-position: 75% center; }
  .oc-spot__body { max-width: 640px; margin-top: 28px; }
  .oc-spot__content { padding-bottom: 56px; }
}
@media (max-width: 560px) {
  .oc-spot { --oc-gutter: 20px; --r: 90vw; }
  /* on phones the car sits behind the text, so dim it a bit more */
  .oc-spot__veil {
    background:
      radial-gradient(circle var(--r) at var(--x) var(--y),
        rgba(var(--oc-navy), .15) 0%, rgba(var(--oc-navy), .45) 60%, rgba(var(--oc-navy), .8) 100%);
  }
}
/* Reduce-motion (often switched on by default on laptops): the script runs a calmer version
   (no vibration, fewer lines) instead of switching everything off, so the hero never looks dead.
   Only the page-load text animation is skipped here. */
@media (prefers-reduced-motion: reduce) {
  .oc-spot.is-calm.js-anim .oc-spot__in { opacity: 1; transform: none; transition: none; }
}